package cn.ks.exception;

import lombok.Data;

@Data
public class GlobalException extends RuntimeException{
    private String code;
    public GlobalException() {
    }

    public GlobalException(String message) {
        super(message);
    }
    public GlobalException(String message,String code) {
        super(message);
        this.code=code;
    }
    public GlobalException(GlobalExceptionCodeEnum codeEnum) {
        super(codeEnum.getMessage());
        this.code=codeEnum.getCode();
    }
}
